import 'package:flutter/material.dart';
import 'package:t_flutter_test/component/layout_widget.dart';

class File02 extends StatelessWidget {
  const File02({super.key});

  @override
  Widget build(BuildContext context) {
    return LayoutWidget(
      body: Container(
        width: 330,
        height: 330,
        // color: Colors.amber,
        margin: EdgeInsets.all(20),
        padding: EdgeInsets.all(10),
        alignment: Alignment.topCenter,
        decoration: BoxDecoration(
          // 使用 decoration 后 背景颜色 color 必须在此处设置 否则会报错
          color: Colors.white,
          borderRadius: BorderRadius.circular(14),
          border: Border.all(color: Colors.blueAccent, width: 6),
          boxShadow: [
            BoxShadow(color: Colors.black, offset: Offset(2, 2), blurRadius: 4),
          ],
        ),
        child: Text(
          '《春宵》 苏轼 \n 春宵一刻值千金，花有清香月有阴。\n 歌管楼台声细细，秋千院落夜沉沉。',
          style: TextStyle(
            fontSize: 18,
            color: Colors.teal,
            fontWeight: FontWeight.bold,
            fontStyle: FontStyle.italic,
          ),
          textAlign: TextAlign.center,
          // maxLines: 2,
          // overflow: TextOverflow.ellipsis,
        ),
      ),
    );
  }
}
